
<template>
  <div class="dashboard-container">
    <div class="app-container">
      <el-button type="primary" :disabled="checkPermission('point-user-delete')">删除</el-button>
      <el-button type="success" :disabled="checkPermission('point-user-add')">添加</el-button>
      <el-button type="warning" :disabled="checkPermission('point-user-update')">编辑</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Employees',
  data() {
    return {

    }
  },

  created() {

  },

  methods: {
    checkPermission(key) {
      const { roles } = this.$store.getters.userInfo
      if (roles.points && roles.points.length) {
        return !roles.points.some(item => item.toLocaleLowerCase() === key)
      }
      return true
    }
  }
}
</script>

<style scoped lang='less'>

</style>
